package cn.mazexal.examapi.models.enums;

import lombok.Getter;

import java.io.Serializable;

/**
 * @author: Mazexal
 * Date: 2025/6/28
 */
@Getter
public enum PayTypeEnum implements Serializable {

    VIP(101, "购买会员");

    private Integer value;
    private String name;

    PayTypeEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static PayTypeEnum getPayTypeEnum(Integer code) {
        for (PayTypeEnum payTypeEnum : PayTypeEnum.values()) {
            if (payTypeEnum.value.equals(code)) {
                return payTypeEnum;
            }
        }
        return null;
    }
}
